public class BayesianAgentForAuction extends Agent
| Modifier and Type | Class and Description |
|---|---|
protected static class |
BayesianAgentForAuction.ACTIONTYPE |
static class |
BayesianAgentForAuction.PHASE |
protected static class |
BayesianAgentForAuction.ROLE |
| Modifier and Type | Field and Description |
|---|---|
protected double |
CONCESSIONFACTOR |
protected OpponentModel |
fOpponentModel |
protected OpponentModel[] |
fOpponentModels |
protected Bid |
fOpponentPreviousBid |
protected BayesianAgentForAuction.PHASE |
fPhase |
protected BayesianAgentForAuction.ROLE |
fRole |
protected int |
fSmartSteps |
protected Action |
messageOpponent |
protected Action |
myLastAction |
protected Bid |
myLastBid |
protected java.util.ArrayList<Bid> |
myPreviousBids |
protected static int |
NUMBER_OF_SMART_STEPS |
fNegotiation, parametervalues, sessionNr, sessionsTotal, startTime, strategyParameters, timeline, totalTime, utilitySpace| Constructor and Description |
|---|
BayesianAgentForAuction() |
| Modifier and Type | Method and Description |
|---|---|
Action |
chooseAction()
this function is called after ReceiveMessage,
with an Offer-action.
|
protected BayesianAgentForAuction.ACTIONTYPE |
getActionType(Action lAction) |
Bid |
getMaxUtilityBid() |
protected Bid |
getNextBidAuction(Bid pOppntBid) |
protected Bid |
getNextBidSmart(Bid pOppntBid) |
double |
getOpponentUtility(Bid bid) |
static java.util.ArrayList<AgentParam> |
getParameters()
Dummy variables, for testing only.
|
protected Bid |
getSmartBid(Bid pBid)
Wouter: Try to find a bid that has same utility for ourself
but max utility for opponent.
|
protected Bid |
getTradeOff(double pUtility) |
static java.lang.String |
getVersion() |
void |
init()
This method is called by the protocol every time before starting a new
session after the internalInit method is called.
|
protected double |
Paccept(double u,
double t1)
This function determines the accept probability for an offer.
|
protected void |
prepareOpponentModel() |
protected Action |
proposeInitialBid() |
protected Bid |
proposeNextBid(Bid pOppntBid) |
void |
ReceiveMessage(Action opponentAction)
informs you which action the opponent did
|
endSession, getAgentID, getName, getParameterValues, getSessionNumber, getSessionsTotal, getStrategyParameters, getUtility, internalInit, isUIAgent, loadSessionData, parseStrategyParameters, restartDataObjectsFolder, saveSessionData, setAgentID, setName, sleepprotected Action messageOpponent
protected Bid myLastBid
protected Action myLastAction
protected Bid fOpponentPreviousBid
protected int fSmartSteps
protected OpponentModel fOpponentModel
protected OpponentModel[] fOpponentModels
protected double CONCESSIONFACTOR
protected static final int NUMBER_OF_SMART_STEPS
protected java.util.ArrayList<Bid> myPreviousBids
protected BayesianAgentForAuction.PHASE fPhase
protected BayesianAgentForAuction.ROLE fRole
public static java.lang.String getVersion()
public static java.util.ArrayList<AgentParam> getParameters()
public void init()
Agentprotected void prepareOpponentModel()
public void ReceiveMessage(Action opponentAction)
AgentReceiveMessage in class Agentprotected Action proposeInitialBid() throws java.lang.Exception
java.lang.Exceptionprotected Bid getNextBidAuction(Bid pOppntBid) throws java.lang.Exception
pOppntBid - java.lang.Exceptionprotected Bid getSmartBid(Bid pBid) throws java.lang.Exception
pBid - java.lang.Exceptionprotected Bid getNextBidSmart(Bid pOppntBid) throws java.lang.Exception
java.lang.Exceptionprotected Bid getTradeOff(double pUtility) throws java.lang.Exception
java.lang.Exceptionprotected Bid proposeNextBid(Bid pOppntBid) throws java.lang.Exception
java.lang.Exceptionpublic double getOpponentUtility(Bid bid) throws java.lang.Exception
java.lang.Exceptionpublic Action chooseAction()
AgentchooseAction in class Agentprotected BayesianAgentForAuction.ACTIONTYPE getActionType(Action lAction)
protected double Paccept(double u,
double t1)
throws java.lang.Exception
u - is the utilityt - is the time as fraction of the total available time
(t=0 at start, and t=1 at end time)java.lang.Exception - if you use wrong values for u or t.public final Bid getMaxUtilityBid() throws java.lang.Exception
java.lang.Exception